package com.atguigu.config;

import com.atguigu.dao.BookDao;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

/**
 * Copyright 2025 ZS Network Co., Ltd. All rights reserved.
 * 本文件仅限于正数网络技术有限公司内部传阅，禁止外泄以及用于其他的商业目的。
 * Created by zwn on 2025/7/28.
 *
 * @description:
 */
@Configuration
//@ComponentScan(value = "com.atguigu", excludeFilters = @ComponentScan.Filter(type = FilterType.ANNOTATION, classes = {Controller.class, Repository.class})) //指定扫描的时候按照什么规则排除哪些组件
@ComponentScan(value = "com.atguigu", includeFilters = {/*@ComponentScan.Filter(type = FilterType.ANNOTATION, classes = {Controller.class,  Service.class}),
                                                        @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {BookDao.class}),*/
                                                        @ComponentScan.Filter(type = FilterType.CUSTOM, classes = MyTypeFilter.class)}
        , useDefaultFilters = false) //指定扫描的时候只包含组件
//FilterType.ANNOTATION 按照注解
//FilterType.ASSIGNABLE_TYPE 按照给定的类型
//FilterType.CUSTOM 自定义
//FilterType.REGEX 按照正则
//FilterType.ASPECTJ 使用AspectJ表达式
public class MainiConfig {
}
